-- enter_roll_bonus
-- created by panyl
-- 进入迷宫时N%概率增加初始卷轴XX

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 对敌伤害触发
    trigger = function(who, prop, arg)
        local num  = math.modf(prop[3] / 1000);
        local rate = prop[3] % 1000;
        if math.random(1000) < rate then
            num = num + 1;
        end

        if num < 1 then
        	return { };
        end

        return {prop[2], num};
    end,

    record = function(target, prop, path)
        return false;
    end 
};